package com.foreveredu.propms.domain;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Description:<br/>
 * 领域模型：收费记录类，保存物业管理员对房产针对具体收费项目按照相应收费标准执行收费操作的记录<br/>
 * Date:<br/>
 * 2013/3/2<br/>
 * 
 * @author hushigang
 */

@Entity
@Table(name = "T_ChargeRecord")
public class ChargeRecord implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;
	private ChargeItem chargeItem;// 收费项目
	private ChargeCriterion chargeCriterion;// 收费标准
	private double wantMoney;// 应收金额
	private Bill bill;// 所属账单

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "chargeItem_id")
	public ChargeItem getChargeItem() {
		return chargeItem;
	}

	public void setChargeItem(ChargeItem chargeItem) {
		this.chargeItem = chargeItem;
	}

	@ManyToOne
	@JoinColumn(name = "chargeCriterion_id")
	public ChargeCriterion getChargeCriterion() {
		return chargeCriterion;
	}

	public void setChargeCriterion(ChargeCriterion chargeCriterion) {
		this.chargeCriterion = chargeCriterion;
	}

	@Column
	public double getWantMoney() {
		return wantMoney;
	}

	public void setWantMoney(double wantMoney) {
		this.wantMoney = wantMoney;
	}

	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name = "bill_id")
	public Bill getBill() {
		return bill;
	}

	public void setBill(Bill bill) {
		this.bill = bill;
	}

}
